<template>
	<view>
		<cu-custom bgColor="bg-blue" :isBack="false">
			<block slot="content">登录</block>
		</cu-custom>
		<view class="flex padding justify-center">
			<!-- 登录页logo -->
			<img src="https://huanxing.oss-cn-beijing.aliyuncs.com/lijx/4371d7d1-8327-41d4-a128-4efab649294b.png"
				style="width: 180rpx;height: 180rpx" />
		</view>
		<view class="flex padding justify-center">
			<!-- 登录页标题 -->
			<text class="text-black text-bold text-lg">环兴商家版</text>
		</view>
		<view>
			<user-login v-if="type=='user'"></user-login>
			<code-login v-if="type=='code'"></code-login>
			<view class="flex justify-center ">
				<view class=" padding-lr-lg" :class="type=='user' ? 'text-grey' :'text-blue'" @tap="type='user'">账号登录</view>
				<view class="text-blue padding-lr-lg"  :class="type=='code' ? 'text-grey' :'text-blue'" @tap="type='code'">手机号登录</view>
			</view>

		</view>

		<view class="text-grey text-sm text-center margin-sm">环兴商城 版本所有（{{versionNumber}}）</view>
	</view>

</template>

<script>
	import userLogin from './userlogin.vue'
	import codeLogin from './codelogin.vue'
	export default {
		components: {
			userLogin,
			codeLogin
		},
		data() {
			return {
				versionNumber: '1.0.0',
				type: 'user'
			}
		},
	}
</script>

<style>
</style>
